package com.zhuss.product.hotLine;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import com.zhuss.bean.bo.product.hotLine.DetailHotLineBo;
import com.zhuss.bean.bo.product.hotLine.SearchHotLineBo;
import com.zhuss.common.ReadService;
import com.zhuss.product.processor.HotLineRead;
import com.zhuss.exception.DzcxException;

/**
 * @description: 热门线路查询Service
 * @author: zhushanshuo
 * @create: Mon Jan 11 09:20:35 CST 2021
 **/
@Component("hotLineReadService")
public class HotLineReadService implements ReadService<Object, Object> {
	
	@Autowired
	@Qualifier("hotLineRead")
	private HotLineRead hotLineRead;
	
	/**
	 * 详情
	 */
	@Override
	public Object detail(Object param) throws DzcxException {
		DetailHotLineBo bo = (DetailHotLineBo) param;
		Long hotLineId = bo.getHotLineId();
		Object vo = hotLineRead.detail(hotLineId);
		return vo;
	}
	
	/**
	 * 列表
	 */
	@Override
	public Object list(Object param) {
		SearchHotLineBo bo = (SearchHotLineBo) param;
		Object result = hotLineRead.list(bo);
		return result;
	}

	public Object bindSiteList(Object param) throws DzcxException{
		DetailHotLineBo bo = (DetailHotLineBo)param;
		Long hotLineId = bo.getHotLineId();
		Object vo = hotLineRead.bindSiteList(hotLineId);
		return vo;
	}
	
}

